/*
 * @Author: your name
 * @Date: 2021-07-12 10:41:50
 * @LastEditTime: 2021-07-12 10:48:31
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \2021-07-09-briup\day03\4-引用数据类型.js
 */
/*
 * @Author: your name
 * @Date: 2021-07-12 10:11:50
 * @LastEditTime: 2021-07-12 10:39:45
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \小米官网\1125.html\2021-07-09-briup\day03\4-引用数据类型.js
 */
//Object 类型 对象
//{} null
//构造函数声明
let obj0 = new Object();
console.log(obj0); //{}
//let obj2={};
//字面量声明
let obj = {
    //key:val,
    //属性：属性值，
    name: 'raoxiaofeng',
    age: 12,
    // /yHello是方法
    sayHello: function() {
        console.log("Hello");
    },
    clazz: {
        name: '1班',
        num: 45,
        status: true,
        //方法，es6的简写
        say() {
            console.log("sayhello");
        }
    }
};
console.log(obj);
//访问对象的属性
obj.age
obj.clazz.num
console.log(obj.age, obj.clazz.num);
//调用方法
obj.sayHello();
obj.clazz.say();
//Array 数组
//Function 函数